<?php
/**
 * Web Gateway
 * @author solar
 */
class WebGateway 
{
	public static function excute($module,$class,$method) {
		$result=Gateway::excute($module,$class,$method);
		if(isset($result['ikylin'])) self::checkCode($result['ikylin']);
		else return $result;
	}
	
	private static function checkCode($code) {
		switch ($code) {
		    case Gateway::Unauthorized:
		        $view=CoreFactory::view();
				$view->render('/auth/sinaAuth','blank');
				exit;
		        break;
		   default: break;
		}
	}
}

?>